<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css" />
<title>Associating Editors With File Types</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</head>

<body bgcolor="#ffffff">
<h1>Associating Editors With File Types</h1>
<p>To associate editors with various file types in the Workbench:</p>
<ol>
  <li>Open the
  <a class="command-link" href="javascript:executeCommand(&quot;org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.FileEditors)&quot;)">
  <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"/>
  <b>General &gt; Editors &gt; File Associations</b></a> preference page.</li>
  <li>Select the file type from the <b>File types</b> list, or click <b>Add</b>
    to add a type that is not already on the list.</li>
  <li>In the <b>Associated editors</b> list, select the editor that you want 
    to associate with that file type. To add an editor to the list: 
    <ol type="a">
      <li>Click <b>Add</b>. The Editor Selection dialog box opens.</li>
      <li>Select <b>Internal Editors</b> or <b>External Programs</b>, depending on
          whether the editor that you want was built for the Workbench or runs outside the Workbench.</li>
      <li>If you select <b>External Programs</b>, you can click the Browse button to
          browse the file system.</li>
      <li>Select the editor from the list and click <b>OK</b>.</li>
    </ol>
  </li>
  <li>Click <b> OK</b> to finish associating the editor with the selected file type.</li>
</ol>

<p>When you associate an internal editor with a file type, that editor opens in
the editor area of the Workbench. For example,  if you double-click a file in the
Project Explorer or an entry in the Bookmarks or Tasks view it opens in the editor area.
</p>

<p filter="ws=win32"><img border="0" src="../images/win_only.svg" alt="Windows only" />
Editors that support OLE document mode can also run in the editor area of the Workbench.
</p>

<p><b>Tip</b>: You can choose to override your default editor selections by
selecting <b>Open With</b> from the pop-up menu for any resource in one of the navigation views.
</p>

<h3 class="related">Related Concepts</h3>
<a href="../concepts/concepts-6.htm">Editors</a><br />
<a href="../concepts/concepts-6a.htm">External editors</a>

<h3 class="related">Related Tasks</h3>
<a href="tasks-46.htm">Opening files for editing</a><br />
<a href="tasks-52.htm">Editing files outside the Workbench</a><br />
<a href="tasks-18.htm">Linking the Project Explorer view to the active editor</a>

</body>
</html>
